  icol:= IWCGJQGrid.JQGridOptions.ColModel.ItemsByName['UnitPrice'];
  if Assigned(icol) then
  begin
    icol.SummaryType:= gcstAvg;
    icol.SummaryTpl:= 'Average: {0}';
  end;

  IWCGJQGrid.JQGridOptions.Grouping:= True;
  iGroup:= IWCGJQGrid.JQGridOptions.GroupingView.Groups.Add;
  if Assigned(iGroup) then
  begin
    iGroup.GroupField:= 'PurchaseDate';
    iGroup.GroupText:= '<b>{0} - {1} Item(s)</b>';
    iGroup.GroupOrder:= gsoDesc;
    iGroup.GroupSummary:= True;
    iGroup.GroupColumnShow:= True;
  end;
  IWCGJQGrid.JQGridOptions.GroupingView.GroupCollapse:= False;
